REM *** FLAGS ARE ALWAYS 0, BUT FOR CLARITY I'LL DO IT ***
SET_FLAG(PLAYER0, FLAG0, 0)
IF(PLAYER0, GAME_TURN > 50)
CREATE_TEXT(1,"WELCOME TO DUNGEON KEEPER. YOUR FIRST OBJECTIVE IS TO CREATE A TREASURE ROOM. SELECT IT FROM THE ROOMS MENU AND LAY DOWN A 3X3 TREASURE ROOM IN THE EMPTY ROOM TO THE WEST.")
DISPLAY_OBJECTIVE(1,PLAYER0)
TUTORIAL_FLASH_BUTTON(6,-1)
SET_FLAG(PLAYER0, FLAG0, 1)
ENDIF
IF (PLAYER0, FLAG0 == 1)
IF(PLAYER0,TREASURE >= 9)
CREATE_TEXT(2,"WELL DONE. PRESS THE RIGHT MOUSE BUTTON TO GET OUT OF ROOM LAYING MODE. NOW MINE OUT ALL THE GOLD TO THE EAST BY TAGGING THE AREA WITH THE LEFT MOUSE BUTTON. YOUR IMPS WILL DIG IT OUT AND PLACE IT IN THE TREASURE ROOM.")
DISPLAY_OBJECTIVE(2,PLAYER0)
SET_FLAG(PLAYER0, FLAG0, 2)
ENDIF
ENDIF
REM *** BUILT TREASURE ROOM ***
IF (PLAYER0, FLAG0 == 2)
IF(PLAYER0,TOTAL_GOLD_MINED >= 3000)
CREATE_TEXT(3,"YOU CAN PICK UP CREATURES WITH THE LEFT MOUSE BUTTON OR SLAP THEM WITH THE RIGHT. SLAPPING THEM WILL MAKE CREATURES WORK HARDER. CREATURES CAN ALSO BE PICKED UP FROM THE CREATURES MENU AND YOU CAN CARRY UP TO EIGHT IN YOUR HAND.")
DISPLAY_OBJECTIVE(3,PLAYER0)
IF(PLAYER0,TOTAL_GOLD_MINED >= 5500)
CREATE_TEXT(9,"POSSESS CREATURES BY CHOOSING THE POSSESS SPELL FROM THE SPELLS MENU AND LEFT-CLICK ON THE CREATURE YOU WANT TO CONTROL. RIGHT-CLICK TO GET BACK TO NORMAL VIEW.")
DISPLAY_OBJECTIVE(9,PLAYER0)
ENDIF
IF(PLAYER0,TOTAL_GOLD_MINED >= 7100)
CREATE_TEXT(4,"WELL DONE. IN PREPARATION FOR THE CREATURES WHO WILL SHORTLY BE ARRIVING INTO YOUR DUNGEON, LAY DOWN A LAIR IN THE AREA WHERE YOU MINED OUT THE GOLD.")
DISPLAY_OBJECTIVE(4,PLAYER0)
ROOM_AVAILABLE(PLAYER0,LAIR,1,1)
TUTORIAL_FLASH_BUTTON(8,-1)
IF(PLAYER0,LAIR >= 9)
CREATE_TEXT(5,"NOW DIG TO THE FLASHING ENTRANCE TO THE NORTH. YOUR IMPS WILL CLAIM THE ENTRANCE AUTOMATICALLY AND THIS WILL ENABLE CREATURES TO ENTER YOUR DUNGEON.")
DISPLAY_OBJECTIVE(5,PLAYER0)
SET_FLAG(PLAYER0, FLAG0, 3)
ENDIF
ENDIF
ENDIF
ENDIF
REM *** BUILT LAIR ***
IF (PLAYER0, FLAG0 == 3)
IF(PLAYER0,FLY >= 1)
CREATE_TEXT(6,"YOUR FIRST MINION IS A FLY. A FAST CREATURE, BUT VERY WEAK.")
DISPLAY_OBJECTIVE(6,PLAYER0)
CREATURE_AVAILABLE(PLAYER0,FLY,1,0)
CREATURE_AVAILABLE(PLAYER0,BUG,1,1)
IF(PLAYER0,BUG >= 1)
CREATE_TEXT(7,"A BEETLE HAS JOINED YOU. ALTHOUGH SLOWER THAN FLIES, THEY MAKE BETTER FIGHTERS. BEETLES, HOWEVER, NEED TO EAT. DIG OUT A 3X3 ROOM TO THE SOUTH AND LAY DOWN A HATCHERY.")
DISPLAY_OBJECTIVE(7,PLAYER0)
CREATURE_AVAILABLE(PLAYER0,FLY,1,1)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
TUTORIAL_FLASH_BUTTON(7,-1)
IF(PLAYER0,GARDEN >= 9)
CREATE_TEXT(8,"NOW ALLOW YOUR IMPS TO FORTIFY YOUR WALLS. REMEMBER, YOU CAN SPEED UP YOUR IMPS BY SLAPPING THEM.")
CREATE_TEXT(12,"BEWARE. HEROES ARE ATTEMPTING TO BREAK INTO YOUR DUNGEON. YOU CAN SEE THEM ON THE SMALL MAP IN THE TOP LEFT HAND CORNER OF THE SCREEN, OR ON THE BIG MAP BY PRESSING M.")
DISPLAY_OBJECTIVE(12,PLAYER0)
TUTORIAL_FLASH_BUTTON(37,-1)
IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
CREATE_TEXT(13,"CONGRATULATIONS. YOU HAVE WON YOUR FIRST BATTLE. HOWEVER, YOU WILL HAVE INCURRED THE WRATH OF THE LORD OF THE LAND. PREPARE YOURSELF.")
DISPLAY_OBJECTIVE(13,PLAYER0)
SET_TIMER(PLAYER0,TIMER2)
SET_FLAG(PLAYER0, FLAG0, 6)
ENDIF
ENDIF
ENDIF
REM *** HAS WON FIRST BATTLE ***
IF (PLAYER0, FLAG0 == 6)
IF(PLAYER0,TIMER2 >= 500)
IF(PLAYER0,TOTAL_CREATURES >= 8)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,KNIGHT,1,1)
CREATE_TEXT(14,"THE LORD OF THE LAND HAS ARRIVED. KILL HIM TO CONQUER THIS REALM.")
DISPLAY_OBJECTIVE(14,PLAYER)
ENDIF
ENDIF
ENDIF
REM *** END LEVEL CHECK - DOESNT NEED A FLAG AS THIRD BATTLE IS ALWAYS KNIGHT ***
REM *** HOWEVER IT MAY BE BETTER TO USE THE FLAG AND THEN TEST FOR PLAYER_GOOD, TOTAL_CREATURES == 0 ***
IF(PLAYER0,BATTLES_WON >= 3)
CREATE_TEXT(15,"THE LORD IS DEFEATED. WELL DONE. YOU HAVE WHAT IT TAKES TO GO ON TO BECOME A TRULY EVIL DUNGEON KEEPER.")